<html>
<head>
<!--
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
-->

<script type="text/javascript" src="mysource_files/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="mysource_files/jquery-ui-1.7.2.custom.min.js"></script>
<!--
<script src="https://www.google.com/jsapi"></script>
<script>

    alert(document.body.innerHTML);
    try {


        google.load('jquery', '1.3.1');
        google.load('jqueryui', '1.7.2');
    
        if(google.loader.LoadFailure)
            throw -1;

    }
    catch(exception) {
    
        var script_jquery = '<script type="text/javascript" src="./?a=2262"></script>';
        var script_jqueryui = '<script type="text/javascript" src="./?a=2263"></script>';
        
        document.body.getElementsByTagName('head').item(0).innerHTML += (script_jquery + script_jqueryui);
        alert(exception);
        document.write("!");
    }
</script>

-->
<title><MySource_PRINT var="site_name" /> :: The University of Waikatio</title>
<link type="text/css" href="mysource_files/jquery-ui-1.7.2.custom.css" rel="stylesheet" />    
        
        <style type="text/css"> 
    .dock {    position:absolute; background:url(mysource_files/drop_bg.png); padding:2px; border:1px solid #d5d5d5; }
    .body { right:180px; left:210px; position:absolute; background:#eee; height:100%; }
    .portlet { margin-bottom:20px; border:none; }
    .portlet-header {   border:none; border-bottom:#bbb solid 1px; padding:1px; padding-left:3px; color:#111; font-family:Arial, Helvetica, sans-serif; font-weight:normal; font-size:12px; background:url(mysource_files/top_greybar.png) #222; cursor:move;}
    .portlet-header .ui-icon { float: right; cursor:pointer; }
    .portlet-content { padding:1px; padding-left:3px; font-family:Arial, Helvetica, sans-serif; font-size:12px; }
    .ui-sortable-placeholder { border: 1px dashed #777; background:none; visibility: visible !important; height: 50px !important; }
    .ui-sortable-placeholder * { visibility: hidden; }
    
    .ui-datepicker { border:none; padding:0px; width:180px; font-size:10px;}
    .ui-datepicker-header { width:180px; font-family:Arial, Helvetica, sans-serif; font-weight:normal;  border:none; }
    .ui-datepicker-calendar { background-color:#eee; border:none; width:200px;  }
    .left_panel_toggle { width:20px; right:0px; position:absolute; height:23px; background:url(mysource_files/toggle_idle.png) no-repeat;  }
    .left_panel {    width: 200px;    position:absolute;    height:100%; background:#eee; }
    
    #title_bar { left:0px; right:30px; height:120px; background-color:#cc0000;}

    #menumap {
	position:absolute;
	top:160px;
	left:201px;
	width: 350px;
	height: 393px;
	z-index:1px;
	font-family:Arial, Helvetica, sans-serif;
	color:#eee;
	font-size:12px;
	font-weight:normal;
}
    
	#searchtoggle { position:absolute; background-color:#fff; right:0px; top:0px; width:60px; height:23px;  background:url(mysource_files/go_idle.png) no-repeat;  }
	#searchdrop { position:absolute; background-color:#000; right:150px; top:120px; width:250px; height:23px; color:#999; font-family:Arial, Helvetica, sans-serif; font-size:10px; }
    #sitetime { position:absolute; left:5px; top:120px; width:240px; height:20px; padding:4px; color:#999; font-family:Arial, Helvetica, sans-serif; font-size:10px; }
/***********************************************/
    .menu_button {background:#cfcfcf; color:#333; border:none; text-decoration:none !important; cursor:pointer; left:0px; right:0px; width:185px; height:29px;  position: absolute; margin:0px;}
    .menu_button .ui-icon { position: absolute; top: 50%; margin-top: -8px; left: 50%; margin-left: -8px; }
    .menu_button .ui-state-active {background:#FF3; color:#900; left:10px;}
    .menu_buttonset { float:left; }
    .menu_buttonset .menu_button { float: left; }
    .menu_buttonset-single .menu_button, 
    .menu_buttonset-multi .menu_button { margin-right: -1px;}
#menumap_scroller .ui-slider-handle { position:absolute;  left:0px; width:20px; height:30px; background:#333; border:none; }
#menumap_scroller .ui-slider-range {  background:none;}
#menumap_scroller {
	left:330px;
	top:53px;
  width: 20px;
  height: 242px;
  margin: 0px;
  
  background: #eee;
  border:none; 
  position: absolute;
}
    /*demo page css*/
    h2 { clear: both; padding-top:1.5em; margin-top:0; } 
    .strike { text-decoration: line-through; }
        #searchtoggle2 {
	position:absolute;
	background-color:#fff;
	right:2px;
	top:0px;
	width:60px;
	height:23px;
	background:url(mysource_files/go_idle.png) no-repeat;
}
        </style> 
        
    <script type="text/javascript"> 
		
function setCookie(c_name,value,expiredays)
	{
		//alert(c_name + ","+value);
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie = (c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString()));
//	alert(document.cookie);
	}
	
	function getCookie(c_name, default_value)
	{
		if (document.cookie.length>0)
		  {
		  c_start=document.cookie.indexOf(c_name + "=");
		  if (c_start!=-1)
			{
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
			}
		  }
		setCookie(c_name, default_value, 100111);
		return default_value;
	}
	
	function updatePortletCookies() {
		
	setCookie("portlet_position_preferences", document.getElementById('portlet_preferences').parentNode.id, 100);
	setCookie("portlet_position_statistics", document.getElementById('portlet_statistics').parentNode.id, 100);
	setCookie("portlet_position_quicklinks", document.getElementById('portlet_quicklinks').parentNode.id, 100);
	}
	
		/*
	
	*/
    $(function() {
               
        $(".left_panel_toggle").toggle(
            function() {
                
        if(g_menuMapOpen)
            toggleMenumap();
                $(".left_panel").animate({  left: -180 }, 200);
                $(".body").animate({ left: 30 }, 200);                
            },
            function() {
                $(".left_panel").animate({ left: 0}, 200);
                $(".body").animate({ left: 210 }, 200);                
            }
        );
                   
        ///////////
        //all hover and click logic for buttons
        $(".menu_button:not(.ui-state-disabled)")
        .hover(
            function(){ 
                if(! $(this).is('.ui-state-active')) {
                $(this).addClass("ui-state-hover").animate({backgroundColor: '#333', color: '#fff'}, 50); 
                }
            },
            function(){ 
                if(! $(this).is('.ui-state-active')) {
                $(this).removeClass("ui-state-hover").animate({backgroundColor: '#cfcfcf', color: '#333'}, 50); 
                }
            }
        )
        .mousedown(function(){
                $(this).parents('.menu_buttonset-single:first').find(".menu_button.ui-state-active").removeClass("ui-state-active").animate({backgroundColor: '#cfcfcf', color: '#333'}, 50);
                if( $(this).is('.ui-state-active.menu_button-toggleable, .menu_buttonset-multi .ui-state-active') ){ $(this).removeClass("ui-state-active"); }
                else { $(this).addClass("ui-state-active"); }    
        })
        .mouseup(function(){
            if(! $(this).is('.menu_button-toggleable, .menu_buttonset-single .menu_button,  .menu_buttonset-multi .menu_button') ){
                $(this).removeClass("ui-state-active");
            }
        });
        ////////
                                
        $(".dock").sortable({
            connectWith: '.dock'
        }); 
        
		$(".dock").bind('sortreceive', function(event, ui) {
updatePortletCookies();
		});                   

        $(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ")
            .find(".portlet-header")
                .addClass("ui-widget-header ui-corner-all")
                .prepend('<span class="ui-icon ui-icon-plusthick"></span>')
                .end()
            .find(".portlet-content");
 
        $(".portlet-header .ui-icon").click(function() {
            $(this).toggleClass("ui-icon-minusthick");
            $(this).parents(".portlet:first").find(".portlet-content").toggle();
        });
 
        $(".column").disableSelection();

        $("#title_bar").hide().fadeIn('slow');

        $("#event_calender_toggle").datepicker();
        
		function sitetime_loop(){
								
			var sitestatus_date = new Date();
			var hours = sitestatus_date.getHours();
			var minutes = sitestatus_date.getMinutes();

			var suffix = "am";
			if (hours >= 12) {
				suffix = "pm";
				hours = hours - 12;
			}
			if (hours == 0) {
				hours = 12;
			}
			
			if (minutes < 10)
				minutes = "0" + minutes;
			
			var divTarget = document.getElementById("sitetime");
			divTarget.innerHTML = (hours + ":" + minutes + suffix + " | " + sitestatus_date.toDateString() + " | " + (navigator.cookieEnabled ? "Cookies active" : "Cookies inactive"));
			setTimeout(function() { sitetime_loop(); }, 60 * 1000);
		}sitetime_loop();
			
        /////////////////////////
        var options = {};
        var g_menuMapOpen = false;
        //run the currently selected effect
        function toggleMenumap(){
            if(g_menuMapOpen) {
                g_menuMapOpen = false;
                $("#menumap").hide('slide',options,500,callback);
            }
            else {
                g_menuMapOpen = true;
                $("#menumap").show('slide',options,500,callback);
            }
        };
                //$("#menumap").hide();
        
        function callback(){
            
            /*
            setTimeout(function(){
                $("#menumap:hidden").removeAttr('style').hide().fadeIn();
            }, 1000);*/
        };
        
        $("#projects_button").click(function() {
            toggleMenumap();
        });

           
    });
	function onClickSearchField() {
	
		var searchField = document.getElementById('searchfield');
		searchField.value = "";
		searchField.style.color = "#000";
		searchField.style.fontStyle = "normal";

	}


var testData = '/P//T/KEA - Keyphrase Extraction Algorithm/T//D/KEA is an algorithm for extracting keyphrases from text documents. It can be either used for free indexing or for indexing with a controlled vocabulary./D//K/Algorithim, Key, Phrase, KEA /K/'+
'/P//T/MOA/T//D/MOA is an algorith lled vocabulary./D//K/Algorithim, MOA/K/' + 
'/P//T/WEKA/T//D/WEKA is an algorit h a controlled vocabulary./D//K/Week, WEKA /K/' + 
'/P//T/Greenstonele /T//D/Green iSTONESa controlled vocabulary./D//K/Green/K/';
var regexp = /<("[^"]*"|'[^']*'|[^'">])*>/gi;
var queryString = (testData.replace(regexp,""));
var queryProjects = queryString.split("/P/");

var projects = new Array();

function Project() {
	this.title = "";
	this.description = "";
	this.keywords = "";//new Array();	
	return this;
}

var currentProject = new Project();
for(var i = 0;i < queryProjects.length; i++) {

	var queryElement = queryProjects[i];	
	var j = queryElement.search('/T/'); 
	if(j >= 0)
		currentProject.title = queryElement.substr(j + 3, queryElement.indexOf('/T/', j + 3) - (j + 3));
	else
		continue;
		
	j = queryElement.search('/D/');
	if(j >= 0)
		currentProject.description = queryElement.substr(j + 3, queryElement.indexOf('/D/', j + 3) - (j + 3));
		 
	j = queryElement.search('/K/');
	if(j >= 0)
		currentProject.keywords = queryElement.substr(j + 3, queryElement.indexOf('/K/', j + 3) - (j + 3));

	projects.push(currentProject);
	currentProject = new Project();

}

/*menumap_search*/
var g_menumapSearch_Clicked = false;
function onChangeMenumapSearch()
{

var typedValue = document.getElementById('menumap_search').value.toLowerCase();
	document.title = typedValue;
	document.getElementById('menumap_list').innerHTML = "";
	for(var i = 0; i < projects.length; i++) {
	
	var project = projects[i];
	var includeResult = false;
	if(project.title.length > 1) {
		if(project.title.toLowerCase().search(typedValue) >= 0)
			includeResult = true;
	}
	if(!includeResult && project.description.length > 1) {
		if(project.description.toLowerCase().search(typedValue) >= 0)
			includeResult = true;
	}
	if(!includeResult && project.keywords.length > 1) {
		if(project.keywords.toLowerCase().search(typedValue) >= 0)
			includeResult = true;
	}
	
	if(includeResult) {
	
		var menuItem = document.createElement('div');
		menuItem.style.fontWeight = "bold";
		menuItem.innerHTML = projects[i].title;
		menuItem.style.paddingTop = "5px";
		menuItem.style.paddingLeft = "25px";	
		menuItem.style.right = "0px";
		menuItem.style.height = "20px";
		if(i % 2 == 1)	menuItem.style.background = "#dfdfdf";
		
		var g_assign = function(itemInst) {
	
			menuItem.onmouseover = function() {
				
				document.getElementById('menumap_desc').innerHTML = itemInst.description;
			}
		};
		g_assign(projects[i]);
		
		document.getElementById('menumap_list').appendChild(menuItem);
	}
		//menumapHTML += ("<div style='padding:5px; width:200px; height:10px;'>" + projects[i].title + "</div>");
	}
//alert(	document.getElementById('menumap_search').value);
}

function onFocusMenumapSearch()
{
	if(!g_menumapSearch_Clicked) {
	
	g_menumapSearch_Clicked = true;
	document.getElementById('menumap_search').value = "";
	}
}
	$(document).ready(function() { 

$("#menumap_scroller").slider({
			orientation: "vertical",
			range: "min",
			min: 0,
			max: 100,
			value: 100,
			slide: function(event, ui) {
			//	$("#amount").val(ui.value);
			}
		});

var menumapItemOver = function(menuItem) {
document.getElementById('menumap_list').innerHTML = menuItem.description;
}
var menumapHTML = "";
for(var i = 0; i < projects.length; i++) {

var menuTitle = document.createElement('div');
menuTitle.style.padding = "5px";
menuTitle.innerHTML = projects[i].title;
	var menuItem = document.createElement('div');
	menuItem.style.fontWeight = "bold";
	menuItem.appendChild(menuTitle); 
	menuItem.style.paddingTop = "0px";
	menuItem.style.paddingLeft = "25px";	
	menuItem.style.right = "0px";
	menuItem.style.height = "29px";
	menuItem.style.borderBottom = "solid 1px #fff";
	menuItem.style.background = (i % 2 == 1) ? "#cfcfcf" : "#dfdfdf";
	
	var g_assign = function(itemInst) {

		menuItem.onmouseover = function() {
			
			document.getElementById('menumap_desc').innerHTML = itemInst.description;
		}
	};
	g_assign(projects[i]);


document.getElementById('menumap_list').appendChild(menuItem);
	//menumapHTML += ("<div style='padding:5px; width:200px; height:10px;'>" + projects[i].title + "</div>");
}
//.innerHTML = menumapHTML;

							   var portlet; 
	portlet = document.getElementById('portlet_preferences');
	portlet.parentNode.removeChild(portlet);
	document.getElementById( getCookie("portlet_position_preferences", "dock_left") ).appendChild(portlet);

	portlet = document.getElementById('portlet_statistics');
	portlet.parentNode.removeChild(portlet);
	document.getElementById( getCookie("portlet_position_statistics", "dock_right") ).appendChild(portlet);

	
	portlet = document.getElementById('portlet_quicklinks');
	portlet.parentNode.removeChild(portlet);
	document.getElementById( getCookie("portlet_position_quicklinks", "dock_right") ).appendChild(portlet);
	updatePortletCookies();
});   
    </script> 
</head> 


<body> 

<div id="title_bar" style="position:absolute; left:0px; top:0px; right:40px; bottom:0px;">

    <div style="left:0px; right:30px; height:120px; background-color:#cc0000;">
    <!-- Site title -->
    <div id="title_uow" style="position:absolute; left:10px; width:300px; top:10px; height:100px; background:no-repeat url(mysource_files/top_uow.png)"></div>
    <div id="title_uow" style="position:absolute; right:150px; width:250px; top:10px; height:100px; background:no-repeat url(mysource_files/top_cosi.png)"></div>
    </div>
  <div style="left:0px; right:0px; top:100px; height:23px; background:url(mysource_files/top_charcoalbar.png) repeat-x;">
  <div style="right:0px; position:absolute; width:83px; height:143px; top:0px; background: url(mysource_files/top_wedge.png) no-repeat;">
  </div>
 
 
  <div id="sitetime"></div>
  <div id="searchdrop">
  <form>
  <input id="searchfield" width="227" border="0" value="Enter search terms here" onClick="javascript:onClickSearchField();" style="position:absolute; background-color:#ddd; color:#999; font-style:italic; border:solid 1px #aaa; width:188px; left:0px; top:0px;">
  </form>
    <div id="searchtoggle"></div>
 </div>
 </div>
</div>
    
    <div style="position:absolute; left:0px; top:160px; right:0px; bottom:0px;">
    <!-- Site body-->  
                        
<div class="left_panel">
<div style="left:0px; right:0px; width:200px; border-bottom:solid #bbb 1px; height:23px; position:absolute; background:url(mysource_files/top_charcoalbar.png) repeat-x;">
<div class="left_panel_toggle"></div>
</div>
<div style="left:0px; right:0px; width:180px; padding:2px; height:330px; top:30px; bottom:0px; position:absolute;  border:1px solid #d5d5d5;">
<div class="menu_buttonset menu_buttonset-single"> 
    <button class="menu_button ui-state-default ui-priority-primary ui-corner-left" style="top:0px;">Home</button> 
    <button class="menu_button ui-state-default ui-priority-primary" style="top:30px;">News</button> 
    <button class="menu_button ui-state-default ui-priority-primary" style="top:60px;">Events</button> 
    <button id="projects_button" class="menu_button ui-state-default ui-priority-primary ui-corner-right" style="top:90px;">Projects</button> 
    <button class="menu_button ui-state-default ui-priority-primary ui-corner-right" style="top:120px;">Help</button>     
</div> 

</div>

<div class="portlet-header" style="left:0px;top:200px; width:180px; position:absolute;"  >Calender</div> 
               <div id="event_calender_toggle" style="left:0px;top:219px; position:absolute;"></div>

    <div id="dock_left" class="dock" style="left:0px; width:180px; top:375px; bottom:10px;"> 
        <div id="portlet_preferences" class="portlet"> 
            <div class="portlet-header">Preferences</div> 
            <div class="portlet-content" style="height:100px;">
            Theme
            <br>Reset Layout
            <br>Text size
            <br>Animation
            </div> 
        </div>      
    </div> 
</div>
            
            

         
        <div class="body" >

<div class="portlet-header"  ><MySource_PRINT var="asset_short_name"/></div> 
                <div class="portlet-content"><MySource_AREA id_name="body" design_area="body" /></div> 
         
        </div> 
         
<div id="dock_right" class="dock" style="right:10px; position:absolute; width:160px; height:400px;"> 
                     
            <div id="portlet_statistics" class="portlet"> 
                <div class="portlet-header">Statistics</div> 
                <div class="portlet-content">Page views</div> 
            </div>
            
            <div id="portlet_quicklinks" class="portlet"> 
                <div class="portlet-header">Quick Links</div> 
                <div class="portlet-content">Links are here<br>Links are here<br>Links are here<br></div> 
            </div> 
      </div> 
</div>

</div>

<div id="menumap" class="ui-widget-content" style="border:none;">
<div  style=" color:#777; font-weight:bold; left:0px; right:0px; width:350px; border-bottom:solid #bbb 1px; height:23px; position:absolute; background:url(mysource_files/top_charcoalbar.png) repeat-x;"><!-- "#cfcfcf" : "#dfdfdf"style has been copied, put into css --><div style=" position:absolute; padding:4px; padding-left:10px;"> Project Browser</div> <div class="left_panel_toggle"></div></div>
    
  <div id="menumap_list" style="position:absolute; left:0px; top:30px; width:330px; height:277px; right:0px; background:#eee; color:#333; "></div>
  <div id="menumap_scroller" ></div>  
  <div style="position:absolute; left:0px; top:302px; border-top:solid 1px #fff; width:350px; height:68px; right:0px; background:#dfdfdf; color:#333; "><div id="menumap_desc" style="padding:10px;" > Menu map contents here</div></div>
  
  <div style="background:url(mysource_files/top_charcoalbar.png); position:absolute; width:350px; height:23px; top:370px; left:0px; border:0px; border:none; color:#333;">  <input id="menumap_search" onKeyUp="onChangeMenumapSearch();" onFocus="onFocusMenumapSearch();" width="227" border="0" value="Enter search terms here" onClick="javascript:onClickSearchField();" style="position:absolute; background-color:#ddd; color:#999; font-style:italic; border:solid 1px #aaa; width:200px; left:15px; top:0px;">
    <div id="searchtoggle2" style="left:215px;" ></div>
     <div id="searchtoggle2" style="left:280px;" ></div>
  </div>
</div>

<div id="dacre">
<div>eeee\n\n\n\neeee</div>
</div>

</body> 
</html> 